<?xml version="1.0"?>

<f:view
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:liferay-ui="http://portletfaces.org/liferayfaces/liferay-ui"
	xmlns:liferay-util="http://portletfaces.org/liferayfaces/liferay-util"
	xmlns:ui="http://java.sun.com/jsf/facelets"
>
	<h:head>
	
	</h:head>
	<h:body>
	<ice:form id="galeria">
		<img src="/GaleriaRotatoria-portlet/images/imagencuatro.png" name="cuatro" id="a" alt="Image" onload="cargar()" style="width: 100%;"/> 
	</ice:form>	
		<script type="text/javascript"> 
			var step=0;		
						
			function autoImgFlip() { 
				if (document.getElementById('a').name=="cuatro") {
					document.getElementById('a').src="/GaleriaRotatoria-portlet/images/imagenuno.png";
					document.getElementById('a').name="uno";
				} else if (document.getElementById('a').name=="uno") {
					document.getElementById('a').src="/GaleriaRotatoria-portlet/images/imagendos.png";
					document.getElementById('a').name="dos";
				} else if (document.getElementById('a').name=="dos") {
					document.getElementById('a').src="/GaleriaRotatoria-portlet/images/imagentres.png";
					document.getElementById('a').name="tres";
				} else if (document.getElementById('a').name=="tres") {
					document.getElementById('a').src="/GaleriaRotatoria-portlet/images/imagencuatro.png";
					document.getElementById('a').name="cuatro";					
				}
			} 
			
			function cargar(){
				setTimeout('autoImgFlip()', 15000);
			}
			
		</script>
	</h:body>
</f:view>